﻿namespace WinForm
{
    using System;
    using System.Collections.Generic;
    using System.ComponentModel;
    using System.Data;
    using System.Drawing;
    using System.Linq;
    using System.Text;
    using System.Windows.Forms;
    using LogWiritter;

    public partial class Form1 : Form
    {
        FileBuilder FB = new FileBuilder();
        MessageBuilder MB = new MessageBuilder();

        public Form1()
        {
            InitializeComponent();
            FB.BuildEmptyFile("log.txt");
        }

        private void Form1_Load(object sender, EventArgs e)
        {
            FB.WriteMessage(MB.BuildMessage("Form 1 Load"));
        }

        private void Form1_Click(object sender, EventArgs e)
        {
            FB.WriteMessage(MB.BuildMessage("Form 1 Click"));
        }

        private void Form1_DoubleClick(object sender, EventArgs e)
        {
            FB.WriteMessage(MB.BuildMessage("Form 1 Double Click"));
        }

        private void Form1_MouseClick(object sender, MouseEventArgs e)
        {
            FB.WriteMessage(MB.BuildMessage("Form 1 Mouse Click"));
        }

        private void Form1_MouseDoubleClick(object sender, MouseEventArgs e)
        {
            FB.WriteMessage(MB.BuildMessage("Form 1 Mouse Double Click"));
        }

        private void Form1_KeyDown(object sender, KeyEventArgs e)
        {
            FB.WriteMessage(MB.BuildMessage("Form 1 Key Down. Key: "+e.KeyValue));
        }

        private void Form1_KeyPress(object sender, KeyPressEventArgs e)
        {
            FB.WriteMessage(MB.BuildMessage("Form 1 Key Press. Key: " + e.KeyChar));
        }

        private void Form1_KeyUp(object sender, KeyEventArgs e)
        {
            FB.WriteMessage(MB.BuildMessage("Form 1 Key Up. Key: " + e.KeyValue));
        }

        private void Form1_Activated(object sender, EventArgs e)
        {
            FB.WriteMessage(MB.BuildMessage("Form 1 Focus Activated"));
        }

        private void Form1_Deactivate(object sender, EventArgs e)
        {
            FB.WriteMessage(MB.BuildMessage("Form 1 Focus Deactivated"));
        }

        private void Form1_Enter(object sender, EventArgs e)
        {
            FB.WriteMessage(MB.BuildMessage("Form 1 Focus Enter"));
        }

        private void Form1_Leave(object sender, EventArgs e)
        {
            FB.WriteMessage(MB.BuildMessage("Form 1 Focus Leave"));
        }

        private void Form1_Validated(object sender, EventArgs e)
        {
            FB.WriteMessage(MB.BuildMessage("Form 1 Focus Validated"));
        }

        private void Form1_Validating(object sender, CancelEventArgs e)
        {
            FB.WriteMessage(MB.BuildMessage("Form 1 Focus Validating"));
        }

        private void Form1_PreviewKeyDown(object sender, PreviewKeyDownEventArgs e)
        {
            FB.WriteMessage(MB.BuildMessage("Form 1 Preview Key Down"));
        }

        private void Form1_MouseDown(object sender, MouseEventArgs e)
        {
            FB.WriteMessage(MB.BuildMessage("Form 1 Mouse Down"));
        }

        private void Form1_MouseEnter(object sender, EventArgs e)
        {
            FB.WriteMessage(MB.BuildMessage("Form 1 Mouse Enter"));
        }

        private void Form1_MouseHover(object sender, EventArgs e)
        {
            FB.WriteMessage(MB.BuildMessage("Form 1 Mouse Hover"));
        }

        private void Form1_MouseLeave(object sender, EventArgs e)
        {
            FB.WriteMessage(MB.BuildMessage("Form 1 Mouse Leave"));
        }

        private void Form1_MouseMove(object sender, MouseEventArgs e)
        {
            FB.WriteMessage(MB.BuildMessage("Form 1 Mouse Move"));
        }

        private void Form1_MouseUp(object sender, MouseEventArgs e)
        {
            FB.WriteMessage(MB.BuildMessage("Form 1 Mouse Up"));
        }

        private void button1_Enter(object sender, EventArgs e)
        {
            FB.WriteMessage(MB.BuildMessage("Button 1 Focus Enter"));
        }

        private void button1_Leave(object sender, EventArgs e)
        {
            FB.WriteMessage(MB.BuildMessage("Button 1 Focus Leave"));
        }

        private void button2_Click(object sender, EventArgs e)
        {
            FB.WriteMessage(MB.BuildMessage("Button 2 Click"));
        }

        private void button2_MouseClick(object sender, MouseEventArgs e)
        {
            FB.WriteMessage(MB.BuildMessage("Button 2 Mouse Click"));
        }
    }
}
